//
//  MapTableViewCell.m
//  PrayerTimes
//
//  Created by Igor Karpenko on 6/9/13.
//  Copyright (c) 2013 Igor Karpenko. All rights reserved.
//

#import "MapTableViewCell.h"

@implementation MapTableViewCell

-(id) initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (!self) {
        return nil;
    }
	
	CGRect newFrame = CGRectMake(10.0f, 10.0f, frame.size.width - 20.0f, 10.0f);
	_titleLabel = [[UILabel alloc] initWithFrame:newFrame];
	_titleLabel.textAlignment = NSTextAlignmentLeft;
	_titleLabel.textColor = RGB(70.0f, 70.0f, 70.0f);
	_titleLabel.numberOfLines = 1;
	_titleLabel.font = [UIFont fontWithName:@"Verdana-Bold"
								 size:8.0f];
	_titleLabel.backgroundColor = [UIColor clearColor];
	[self addSubview:_titleLabel];
	
	newFrame.size.height = frame.size.height - newFrame.origin.y - newFrame.size.height - 10.0f;
	newFrame.origin.y = _titleLabel.frame.origin.y + _titleLabel.frame.size.height;
	
	_detailedLabel = [[UILabel alloc] initWithFrame:newFrame];
	_detailedLabel.textAlignment = NSTextAlignmentLeft;
	_detailedLabel.textColor = RGB(70.0f, 70.0f, 70.0f);
	_detailedLabel.numberOfLines = 0;
	_detailedLabel.font = [UIFont fontWithName:@"Verdana"
										 size:8.0f];
	_detailedLabel.backgroundColor = [UIColor clearColor];
	[self addSubview:_detailedLabel];
	
	_titleLabel.text = @"asdasd asdas fdsf ";
	_detailedLabel.text = @"asd asdfja sfkjsdjkfhasdj fhajksdfh jkasdfh adhsf ahsdg fadhsg fj";
	
	_separator = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"map_tableSeparator"]];
	newFrame = _separator.frame;
	newFrame.size.height = frame.size.height;
	_separator.frame = newFrame;
	[self addSubview:_separator];
	
    return self;
}


-(void) dealloc {
	[_titleLabel release];
	[_detailedLabel release];
	[_separator release];
	
	[super dealloc];
}

@end
